// sales服务
define('dailyServers', ['angular','jquery'], function (angular,$) {
    var module = angular.module('servers');
    module.factory('dailyServers', ['$http','Urlconfig',function($http,Urlconfig) { 
        var obj = {
            //搜索公司销售日报
            
            searchWork: function (info) {
                return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/work/search',
                    data:$.param(info),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                }).then(function (response) {
                    return response.data;
                });
            },
            addMeetingList: function (info) {
                return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/work/add',
                    data:$.param(info),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                }).then(function (response) {
                    return response.data;
                });
            },
            setMeetingList: function (info) {
                return $http({
                    method  : 'POST',
                    url: 'http://'+Urlconfig.apiUrl+':8888/api/work/set',
                    data:$.param(info),
                    headers : { 'Content-Type': 'application/x-www-form-urlencoded' }
                }).then(function (response) {
                    return response.data;
                });
            }           
        };
        return obj;
    }]);
});